package com.yunhe.policyfulfillment.policyful.repository;

import com.yunhe.policyfulfillment.policyful.domain.Annex;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: AnnexRepository
 * @Description:
 * @author: GongDaCheng
 * @Date: 16:06 2021/8/24
 */
@Repository
public interface AnnexRepository {

    /**
     * @Description 新增附件
     * @Param Annex annex
     * @Return int
     * @Date 2021/8/24 16:06
     */
    int createAnnex(Annex annex);

    /**
     * @Description 根据id查询附件
     * @Param long id
     * @Return Annex
     * @Date 2021/8/24 16:07
     */
    Annex findAnnexById(@Param("id") long id);

    /**
     * @Description 根据诉求id获取该诉求的附件
     * @Param long appealId
     * @Return List<Annex>
     * @Date 2021/8/26 16:59
     */
    List<Annex> findAnnexByAppealId(@Param("appealId") long appealId);
}
